﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Data.Linq;
using System.Text;
using System.Windows.Forms;

namespace CSharpXDL
{
    public partial class InputForm : Form
    {
        public InputForm()
        {
            InitializeComponent();
            saveFolder.Text="C:\\";
//          addrss.Text = "http://xbox-ecn102.vo.msecnd.net/content/434307fc/SF4ArcadeEdition_Manual_Fix.pdf";
            addrss.Text = "ftp://dygod1:dygod1@d615.dygod.org:5008/孤岛惊魂.[国语中字.1024分辨率]/[电影天堂-www.dy2018.net]孤岛惊魂HD国语中字.rmvb";          
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;

        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }

        private void button1_Click(object sender, EventArgs e)
        {
           

            if (saveFileDialog1.ShowDialog(this) == DialogResult.OK)
            {
                saveFolder.Text = saveFileDialog1.FileName;
              }
        }

        private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
        {

        }

        private void addrss_TextChanged(object sender, EventArgs e)
        {

              String[] ss=addrss.Text.Split('/');
            String fname = ss[ss.Length - 1];
             if (fname.Length > 200) {
                fname = fname.Split('?')[0];
            }
            saveFolder.Text = fname.Replace("?", "");
            saveFileDialog1.FileName = saveFolder.Text;

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void comboBox1_DrawItem(object sender, DrawItemEventArgs e)
        {

        }
    }
}
